package cn.com.wantools.model.exchange;

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * @author wangxiaoxiang
 * 汇率类
 */
public class ExchangeInfo {
    private String baseCurrency;

    /**
     * 失效时间戳，毫秒数
     */
    private Long expiredTimestamp;
    private Map<String, BigDecimal> exchangeMap = new HashMap<>();

    public void setExchangeMap(Map<String, BigDecimal> exchangeMap) {
        this.exchangeMap = exchangeMap;
    }

    public Map<String, BigDecimal> getExchangeMap() {
        return exchangeMap;
    }

    public void setBaseCurrency(String baseCurrency) {
        this.baseCurrency = baseCurrency;
    }

    public String getBaseCurrency() {
        return baseCurrency;
    }

    public void putExchange(String currency, BigDecimal exchangeRate) {
        exchangeMap.put(currency, exchangeRate);
    }

    public BigDecimal getExchange(String currency) {
        return exchangeMap.get(currency);
    }

    public Long getExpiredTimestamp() {
        return expiredTimestamp;
    }

    public void setExpiredTimestamp(Long expiredTimestamp) {
        this.expiredTimestamp = expiredTimestamp;
    }
}
